<?php defined('SYSPATH') or die('No direct script access.');
//adminframe
class Controller_Adminframe extends Controller_Template{
	public $template = 'adminframe/admin';
	
	public function before()
	{
		parent::before();

	}
	public function action_index()
	{
		$this->template->username = $this->get_username() ;
		$sid = Session::instance()->get('sid', NULL);
		if($sid == NULL)
		{
			Request::current() -> redirect('login');
		}
	}
	public function action_head()
	{
		$this->template = View::factory('adminframe/head');
		$this->template->username = $this->get_username();

	}
	public function action_left()
	{
		$this->template = View::factory('adminframe/leftnav');
		$this->template->username = $this->get_username();
	}
	public function action_content()
	{
		$this->template = View::factory('adminframe/maincont');
		$this->template->username = $this->get_username();
	}
	public function action_footer()
	{
		$this->template = View::factory('adminframe/footer');
		$this->template->username = $this->get_username();
	}
	public function action_building()
	{
		$this->template = View::factory('adminframe/building');
	}

} // End Controller_Passport
